home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / XPRINTF.CC < prev   
Text File  |  1993-04-04  |  2KB  |  40 lines

  1. #include <stdarg.h>
  2. #include <stdio.h>
  3.  
  4.  
  5. void xprintf(int row, int col,int attr, va_list arg_list, ...)
  6. /*
  7. ┌────────────────────────────────────────────────────────────────────┐
  8. │Purpose: Provide for fast formatted output to video screen.         │
  9. │                                                                    │
  10. │                                                                    │
  11. │                                                                    │
  12. │ Inputs: row = row to display at.                                   │
  13. │         col = col to display at.                                   │
  14. │         attr = attr to display text with.                          │
  15. │         va_list = format string and arguments, these are exactly   │
  16. │                   the same format as printf requires.              │
  17. │                                                                    │
  18. │Outputs: None                                                       │
  19. │                                                                    │
  20. │ Return: None                                                       │
  21. │                                                                    │
  22. │Also see: writef, writef_n, video_type, make_window.                │
  23. │                                                                    │
  24. │Prototype in: tcutil.h                                              │
  25. └────────────────────────────────────────────────────────────────────┘
  26. */
  27. {
  28.     va_list arg_ptr;
  29.     char *format;
  30.     char output[161];
  31.  
  32.     va_start(arg_ptr, arg_list);
  33.     format = arg_list;
  34.     vsprintf(output, format, arg_ptr);
  35.     writef(row,col,attr,output);
  36.  
  37.     va_end(arg_ptr);
  38. }
  39.  
  40.